<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>v-bind</h1>
    <p>用于给标签的属性绑定属性值。</p>
    <p>v-bind非常常用，所以它的语法糖（简写）为 :属性名="表达式"</p>
    <main id="app">
        <a href="https://www.baidu.com">百度一下</a>
		<a v-bind:href="baidu.url">{{baidu.site}}</a>
		<a v-bind:href="bilibili.url">{{bilibili.site}}</a>
		<a :href="bilibili.url">{{bilibili.site}}</a>
    </main>
</body>
<script src="../vue.min.js"></script>
<script>
    let vue = new Vue({
        el: "#app",
        data() {
            return {
                baidu: {
					site: "百度",
					url: "https://www.baidu.com"
				},
				bilibili: {
					site: "B站",
					url: "https://www.bilibili.com"
				} 
            }
        },
    })
</script>
</html>